package cn.bgs.controller;


import cn.bgs.common.R;
import cn.bgs.pojo.CellIntermediate;
import cn.bgs.service.ICellIntermediateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 小区中间表 前端控制器
 * </p>
 *
 * @author cf
 * @since 2022-06-07
 */
@RestController
@RequestMapping("/cell-intermediate")
public class CellIntermediateController {

    @Autowired
    private ICellIntermediateService iCellIntermediateService;

    /**
     * 查询中间表id
     * @param communityId
     * @param buildingId
     * @param cellId
     * @param floorId
     * @param portalId
     * @return
     */
    @GetMapping("/seetreeunder")
    public R seetreeunder(@RequestParam("userId") Integer userId,@RequestParam("communityId") Integer communityId, @RequestParam("buildingId") Integer buildingId, @RequestParam("cellId") Integer cellId, @RequestParam("floorId") Integer floorId, @RequestParam("portalId") Integer portalId){
        CellIntermediate cellIntermediate =iCellIntermediateService.seetreeunder(communityId,buildingId,cellId,floorId,portalId);
        return R.ok().data("id",cellIntermediate);
    }

}
